function fix_backpic() {

	$("#side_dav li").mouseover(function() {
		 //console.log("开始执行");
		// console.log("鼠标移上");
		var span = $(this).children("a").children("span").first();
		var classname = span.attr("class");
		// console.log("原css:"+classname);
		span.removeClass(classname);
		span.addClass(classname + "_hover");
		// console.log("现在css:"+span.attr("class"));
	});
	$("#side_dav li").mouseout(function() {
		// console.log("鼠标移出");
		var span = $(this).children("a").children("span").first();
		var classname = span.attr("class");
		// console.log("移出后：");

		span.removeClass(classname);
		span.addClass(classname.substring(0, classname.lastIndexOf("_")));
		// console.log("css:"+classname.substring(0,classname.lastIndexOf("_")));
	});
	
	
}
/*function fixGridPanel(){
		var h = document.body.clientHeight;//获取页面可见高度  
        console.log(document.getElementById("gridPanel").style.height);
		console.log("height:"+h);
	}*/
function fixCss(){
//	console.log($(".spaceUI_span"));
	$(".spaceUI_span").width(155*usedsize/totalsize);
	$("#use_space").html(usedsize+"M");
	$("#total_space").html("/"+totalsize+"M");
	$("#logo").parent().addClass("head");
	//修复鼠标以上背景下效果
	fix_backpic();
	//fixgridPanel();
	addClick();
	}

function addClick(){
	$("#side_dav li").click(function(){
		var clickId=$(this).attr("id");
		var store=Ext.getCmp('gridPanel').getStore();
		console.log(clickId);
		if(clickId=='all_file'){
			Ext.getCmp("gridPanel").show();
			Ext.getCmp("gridPanel2").hide();
			Ext.getCmp('gridPanel').listRootFiles();
			return;
		}
		if(clickId=='all_pic'){
			Ext.getCmp("gridPanel").show();
			Ext.getCmp("gridPanel2").hide();
			store.proxy.setUrl("getFileFilter?fileType=picture");
			store.load();
			return;
		}
		if(clickId=='all_document'){
			Ext.getCmp("gridPanel").show();
			Ext.getCmp("gridPanel2").hide();
			store.proxy.setUrl("getFileFilter?fileType=doc");
			store.load();
			return;
		}
		if(clickId=='all_video'){
			Ext.getCmp("gridPanel").show();
			Ext.getCmp("gridPanel2").hide();
			store.proxy.setUrl("getFileFilter?fileType=video");
			store.load();
			return;
		}
		if(clickId=='all_music'){
			Ext.getCmp("gridPanel").show();
			Ext.getCmp("gridPanel2").hide();
			store.proxy.setUrl("getFileFilter?fileType=music");
			store.load();
			return;
		}
		if(clickId=='all_other'){
			Ext.getCmp("gridPanel").show();
			Ext.getCmp("gridPanel2").hide();
			store.proxy.setUrl("getFileFilter?fileType=other");
			store.load();
			return;
		}
		if(clickId=='recycle'){
			var store=Ext.getCmp('gridPanel2').getStore();
			store.proxy.setUrl("getRecycal");
			store.load();
			Ext.getCmp("gridPanel").hide();
			Ext.getCmp("gridPanel2").show();
			
			//Ext.MessageBox.alert("提示：","本功能尚未实现！");
		}
		if(clickId=='sumup'){
			Ext.MessageBox.alert("提示：","本功能尚未实现！");
		}
		});
}
